#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "UMLShape.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class UMLCompartment;

/// <summary>
/// UMLCompartmentableShape
/// The most general class for UML elements that may have contents shown in
/// separated portions inside the shape.
/// </summary>
class UMLMODEL_EXPORT UMLCompartmentableShape : public UMLShape {

public: // Constructors and destructors
    explicit UMLCompartmentableShape(const QString& umlType="uml::UMLCompartmentableShape");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// compartments getter
    /// Separated portions of the shape.
    /// </summary>
    vector<shared_ptr<UMLCompartment>>& compartments();

private: // Fields
    /// <summary>
    /// compartments
    /// Separated portions of the shape.
    /// </summary>
    vector<shared_ptr<UMLCompartment>> compartments_;

};

} // namespace uml
